<?php
$page_title="Send Email - Status";
include("includes/header.php");

$emailList=$_POST["member_email"];
$curTime=getIndianDateTime();
$content=$_POST["mail_content"];
$subject=$_POST["mail_subject"];

$file_attachment=

$actual_path="../docs/";
$file_attachment="";
if(move_uploaded_file($_FILES['attach_file']['tmp_name'],$actual_path.$_FILES['attach_file']['name'])) {

$file_attachment=$actual_path.$_FILES['attach_file']['name'];

} 


foreach($emailList as $j=>$emailItem){

echo "Sending Email ".$emailItem." : ";
if(send_generic_mail($emailItem,$subject,$content,$file_attachment)){

 echo "Success";

}
else{

 echo "Failed";

}
echo "<br/><br/>";

}


include("includes/footer.php");
?>